package icu.lookyousmileface.buy;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author starrysky
 * @title: RunErrands
 * @projectName spring5
 * @description: 跑腿
 * @date 2021/2/222:30
 */
public class RunErrands implements Shopping  {

    @Autowired
    private Student student;


    public RunErrands(Student student) {
        this.student = student;
    }

    @Override
    public void buy() {
        getBuy();
        student.buy();
        go();
        fare();
    }

    public void fare(){
        System.out.println("收取小费！");
    }

    public void go(){
        System.out.println("买回来了！");
    }

    public void getBuy(){
        System.out.println("接单！");
    }
}
